gtk/gtkcelllayout.c: Use G_DEFINE_INTERFACE macro
authorJavier Jardón <jjardon@gnome.org>
Wed, 25 Aug 2010 19:58:37 +0000 (21:58 +0200)
committerJavier Jardón <jjardon@gnome.org>
Wed, 25 Aug 2010 22:33:56 +0000 (00:33 +0200)
gtk/gtkcelllayout.c

index 985457be85abc62995a2dfa4481e2da8e9c01911..86e8e396443cee433e48a2fb5696d624a8087e35 100644 (file)
 #include "gtkintl.h"
 
 
-GType
-gtk_cell_layout_get_type (void)
-{
-  static GType cell_layout_type = 0;
+typedef GtkCellLayoutIface GtkCellLayoutInterface;
+G_DEFINE_INTERFACE (GtkCellLayout, gtk_cell_layout, G_TYPE_OBJECT);
 
-  if (! cell_layout_type)
-    {
-      const GTypeInfo cell_layout_info =
-      {
-        sizeof (GtkCellLayoutIface),
-        NULL,
-        NULL,
-        NULL,
-        NULL,
-        NULL,
-        0,
-        0,
-        NULL
-      };
-
-      cell_layout_type =
-        g_type_register_static (G_TYPE_INTERFACE, I_("GtkCellLayout"),
-                                &cell_layout_info, 0);
-
-      g_type_interface_add_prerequisite (cell_layout_type, G_TYPE_OBJECT);
-    }
 
-  return cell_layout_type;
+static void
+gtk_cell_layout_default_init (GtkCellLayoutInterface *iface)
+{
 }
 
 /**